/**
 * 
 */
package com.agrec.client;

import java.util.Iterator;

import com.google.gwt.user.client.History;
import com.google.gwt.user.client.ui.DeckPanel;
import com.google.gwt.user.client.ui.Widget;

/**
 * @author allomeen
 *
 */
public class KMRDeckPanel extends DeckPanel {

	/**
	 * 
	 */
	public KMRDeckPanel() {
		super();
		
	}
	
	public void showWidget(String name){
		int i = 0;
        for (Iterator<Widget> iterator = this.iterator(); iterator
                .hasNext();) {
        	KMRPage tab = (KMRPage) iterator.next();
            if (tab.historyName().equals(name)) {
                this.showWidget(i);//selectTab(i);
                History.newItem("" + tab.historyName());
            }
            i++;
        }
	}


}
